import Vue from 'vue'
import App from './App.vue'
import axios from 'axios';
import 'animate.css';
Vue.config.productionTip = false

// 适配器 
// axios拦截器 
// 请求拦截器 
axios.interceptors.request.use(function(config){
  console.log("请求拦截器",config);
  config['headers']['Authorization'] = "Bearer "+localStorage.getItem("token");
  return config;
})
// 返还拦截器
axios.interceptors.response.use((res)=>{
  console.log("返还拦截器",res);
  return res
})

Vue.prototype.$http = axios;

new Vue({
  render: h => h(App),
}).$mount('#app')
